using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class KadaaMap : EntityTypeConfiguration<Kadaa>
    {
        public KadaaMap()
        {
            // Primary Key
            this.HasKey(t => t.KAD_ID);

            // Properties
            this.Property(t => t.KAD_Name)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("Kadaa");
            this.Property(t => t.KAD_ID).HasColumnName("KAD_ID");
            this.Property(t => t.KAD_Name).HasColumnName("KAD_Name");
            this.Property(t => t.KAD_Mouhafaza).HasColumnName("KAD_Mouhafaza");
        }
    }
}
